import {
  Component,
  Injector,
  ElementRef,
  ViewChild,
  OnInit,
  AfterViewInit,
} from "@angular/core";

import { ModalDirective } from "ngx-bootstrap";
import { appModuleAnimation } from "@shared/animations/routerTransition";
import { AppComponentBase } from "@shared/common/app-component-base";
import * as echarts from "echarts";
import Swiper from "swiper";
import {
  MainTaskServiceProxy,
  TaskDto,
  MainTaskGoProductionDto,
  NameValueDtoOfNameValueDto,
  PipelineServiceProxy,
  SideTaskServiceProxy,
  OrganizationUnitServiceProxy,
  ComboboxItemDto,
  UpdateOrganizationUnitInput,
  FindOrganizationUnitUsersInput,
  PipelineUsersInput,
  GetPipeLineDecomposeDto,
  Demo2ServiceProxy,
  GetDayDto,
  MaterialCount,
} from "@shared/service-proxies/service-proxies";
import { LazyLoadEvent } from "primeng/api";
import { SelectItem } from "primeng/api";
import { finalize } from "rxjs/operators";
import { e } from "@angular/core/src/render3";

@Component({
  templateUrl: "./demo2.component.html",
  styleUrls: ["./demo2.component.less"],
  animations: [appModuleAnimation()],
})
export class Demo2Component extends AppComponentBase implements AfterViewInit {
  @ViewChild("DatePicker") datePicker: ElementRef;
  saving = false;

  GetCurrentmMouthDeliveryRecords = "";
  getGreadTeam = [];

  GreatTeamDay = [];
  GreatTeamCount = [];
  EXECCount = [];
  PrintCount = [];
  TechnologyCount = [];
  _MaterialCount: MaterialCount;
  materialPluss = "";
  materialReturnCount = "";
  materialSubtracts = "";

  materialPlussDay = [];
  materialReturnCountDay = [];
  materialSubtractsDay = [];

  greatTeamGreap = [];
  totalGreatTeamGreap = [];
  alreadygreatTeamGreap = [];
  greatObject = {};
  PeplineObject = [];

  GetMonthlyPlanCount = "";
  GetMonthlyPlanProductionCount = "";

  GetModelCount = [];
  GetModel = [];
  getTeamTask = [];
  isshow = false;

  GetWorkTimeCount = "";
  GetAbnormalCount = "";
  GetProcedureFinshCount = "";
  GetNodeExeSort = [];

  

  constructor(
    injector: Injector,
    private _mainTaskServiceProxy: MainTaskServiceProxy,
    private _sideTaskServiceProxy: SideTaskServiceProxy,
    private _pipelineService: PipelineServiceProxy,
    private _demo2ServiceProxy: Demo2ServiceProxy
  ) {
    super(injector);
  }
  getTime = new Date();
  es: any;

  ngOnInit(): void {

    this.getTime.setMonth(this.getTime.getMonth()-1);

  }


  init() {
    var myDate =this.getTime;
    //myDate.setMonth(myDate.getMonth()-1);
    var myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
    var myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
    this._demo2ServiceProxy
      .getCurrentmMouthDeliveryRecords(myYear, myMonth)
      .subscribe((result) => {
        //this.tmpls = result.items;
       // console.log(result.totalCount);
        this.GetCurrentmMouthDeliveryRecords = result.toString();
      });

    this._demo2ServiceProxy
      .getMonthlyPlanCount(myYear, myMonth)
      .subscribe((result) => {
        this.GetMonthlyPlanCount = result.toString();
      });

    this._demo2ServiceProxy
      .getMonthlyPlanProductionCount(myYear, myMonth)
      .subscribe((result) => {
        this.GetMonthlyPlanProductionCount = result.toString();
      });

    this._demo2ServiceProxy
      .getNodeEntery(myYear, myMonth, "绑定主制班组")
      .subscribe((result) => {
        //  let  ss=new GetDayDto();
        //  ss.
        this.GreatTeamDay = result.items.map((el) => el.asDay);
        this.GreatTeamCount = result.items.map((el) => el.count);
        this._demo2ServiceProxy
        //  .getNodeEntery(myYear, myMonth, "打印交接单")
        .getDeliveryRecordsPay(myYear, myMonth)
          .subscribe((result) => {
            this.PrintCount = result.items.map((el) => el.count);
            this._demo2ServiceProxy
              .getNodeEntery(myYear, myMonth, "工艺校验")
              .subscribe((result) => {
                this.EXECCount = result.items.map((el) => el.count);
                this._demo2ServiceProxy
                  .getNodeEnteryAtcType(myYear, myMonth, 18)
                  .subscribe((result) => {
                    this.TechnologyCount = result.items.map((el) => el.count);

                    this._demo2ServiceProxy
                      .getGreatTeamGreap(myYear)
                      .subscribe((result) => {
                        // GetGreatTeamGreap
                        this.greatTeamGreap = result.items.map((e) => e.asDay);
                        this.totalGreatTeamGreap = result.items.map(
                          (e) => e.count
                        );
                        this._demo2ServiceProxy
                          .getAlreadyGreatTeamGreap(myYear)
                          .subscribe((result) => {
                            this.alreadygreatTeamGreap = result.items.map(
                              (e) => e.count
                            );
                            // this.greatObject={
                            //   orderNum: this.greatTeamGreap,categoryArr: this.totalGreatTeamGreap,
                            //   avgTime: this.alreadygreatTeamGreap
                            // }
                            this.centertop(this.GreatTeamDay, this.greatObject);
                            //this.conterbottomleft();
                            this.conterbottomleft(
                              this.totalGreatTeamGreap,
                              this.greatTeamGreap,
                              this.alreadygreatTeamGreap
                            );
                          });
                        // this._demo2ServiceProxy.getGreatTeamGreap(myYear).subscribe((result) => {
                        // orderNum: greatObject.orderNum,
                        // categoryArr: greatObject.categoryArr,
                        // avgTime: greatObject.avgTime,

                        // this.greatObject.categoryArr  =result.items.map(e=>e.asDay);
                        // this.greatObject.orderNum=result.items.map(e=>e.count);
                      });
                  });
              });
          });

        this._demo2ServiceProxy
          .getMaterialCount(myYear, myMonth)
          .subscribe((result) => {
            this.materialPluss = result.items[0].materialPluss.toString();
            this.materialReturnCount = result.items[0].materialReturnCount.toString();
            this.materialSubtracts = result.items[0].materialSubtracts.toString();
          });

        this._demo2ServiceProxy
          .getMaterialMouth(myYear, "")
          .subscribe((result) => {
            this.materialPlussDay = result.items.map((el) => {
              return { count: el.count };
            });
            this._demo2ServiceProxy
              .getMaterialMouth(myYear, "MaterialReturn")
              .subscribe((result) => {
                this.materialReturnCountDay = result.items.map((el) => {
                  return { count: el.count };
                });
                this._demo2ServiceProxy
                  .getMaterialSubtractsMouth(myYear, "")
                  .subscribe((result) => {
                    this.materialSubtractsDay = result.items.map((el) => {
                      return { count: el.count };
                    });
                    this.conterbottomright(
                      this.materialPlussDay,
                      this.materialReturnCountDay,
                      this.materialSubtractsDay
                    );
                  });
              });
          });

        this._demo2ServiceProxy.getAllPipelines(myYear).subscribe((result) => {
          this.righttop(result.items);
        });
      });

    this._demo2ServiceProxy.getTeamTask(myYear, myMonth).subscribe((result) => {
      this.getTeamTask = result.map((el) => {
        return { name: el.teamName, value: el.teamCount };
      });
      this._demo2ServiceProxy
        .getModelCount(myYear, myMonth)
        .subscribe((result) => {
          this.GetModel = result.map((el) => el.name);
          this.GetModelCount = result.map((el) => {
            return { name: el.name, value: el.value };
          });

          this.leftbottomchar();
        });
    });

    this._demo2ServiceProxy.getWorkTimeCount(myYear,myMonth).subscribe((result) => {
      this.GetWorkTimeCount = result.toString();
      this._demo2ServiceProxy.getAbnormalCount(myYear,myMonth).subscribe((result) => {
        this.GetAbnormalCount = result.toString();
        this._demo2ServiceProxy
          .getProcedureFinshCount(myYear,myMonth)
          .subscribe((result) => {
            this.GetProcedureFinshCount = result.toString();
          });
      });
    });

    this._demo2ServiceProxy.getNodeExeSort(myYear).subscribe((result) => {
      this.GetNodeExeSort = result.items;
    });
    this.toptime();




  
  }

  ngAfterViewInit() {
    console.log();
    this._MaterialCount = new MaterialCount();
    var myDate = this.getTime;
    var myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
    var myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
    this._demo2ServiceProxy
      .getCurrentmMouthDeliveryRecords(myYear, myMonth)
      .subscribe((result) => {
        //this.tmpls = result.items;
       //console.log(result.totalCount);
        this.GetCurrentmMouthDeliveryRecords = result.toString();
      });

    this._demo2ServiceProxy
      .getMonthlyPlanCount(myYear, myMonth)
      .subscribe((result) => {
        this.GetMonthlyPlanCount = result.toString();
      });

    this._demo2ServiceProxy
      .getMonthlyPlanProductionCount(myYear, myMonth)
      .subscribe((result) => {
        this.GetMonthlyPlanProductionCount = result.toString();
      });

    this._demo2ServiceProxy
      .getNodeEntery(myYear, myMonth, "绑定主制班组")
      .subscribe((result) => {
        //  let  ss=new GetDayDto();
        //  ss.
        this.GreatTeamDay = result.items.map((el) => el.asDay);
        this.GreatTeamCount = result.items.map((el) => el.count);
        this._demo2ServiceProxy
          //.getNodeEntery(myYear, myMonth, "打印交接单")
         .getDeliveryRecordsPay(myYear, myMonth)
          .subscribe((result) => {
            this.PrintCount = result.items.map((el) => el.count);
            this._demo2ServiceProxy
              .getNodeEntery(myYear, myMonth, "工艺校验")
              .subscribe((result) => {
                this.EXECCount = result.items.map((el) => el.count);
                this._demo2ServiceProxy
                  .getNodeEnteryAtcType(myYear, myMonth, 18)
                  .subscribe((result) => {
                    this.TechnologyCount = result.items.map((el) => el.count);

                    this._demo2ServiceProxy
                      .getGreatTeamGreap(myYear)
                      .subscribe((result) => {
                        // GetGreatTeamGreap
                        this.greatTeamGreap = result.items.map((e) => e.asDay);
                        this.totalGreatTeamGreap = result.items.map(
                          (e) => e.count
                        );
                        this._demo2ServiceProxy
                          .getAlreadyGreatTeamGreap(myYear)
                          .subscribe((result) => {
                            this.alreadygreatTeamGreap = result.items.map(
                              (e) => e.count
                            );
                            // this.greatObject={
                            //   orderNum: this.greatTeamGreap,categoryArr: this.totalGreatTeamGreap,
                            //   avgTime: this.alreadygreatTeamGreap
                            // }
                            this.centertop(this.GreatTeamDay, this.greatObject);
                            //this.conterbottomleft();
                            this.conterbottomleft(
                              this.totalGreatTeamGreap,
                              this.greatTeamGreap,
                              this.alreadygreatTeamGreap
                            );
                          });
                        // this._demo2ServiceProxy.getGreatTeamGreap(myYear).subscribe((result) => {
                        // orderNum: greatObject.orderNum,
                        // categoryArr: greatObject.categoryArr,
                        // avgTime: greatObject.avgTime,

                        // this.greatObject.categoryArr  =result.items.map(e=>e.asDay);
                        // this.greatObject.orderNum=result.items.map(e=>e.count);
                      });
                  });
              });
          });

        this._demo2ServiceProxy
          .getMaterialCount(myYear, myMonth)
          .subscribe((result) => {
            this.materialPluss = result.items[0].materialPluss.toString();
            this.materialReturnCount = result.items[0].materialReturnCount.toString();
            this.materialSubtracts = result.items[0].materialSubtracts.toString();
          });

        this._demo2ServiceProxy
          .getMaterialMouth(myYear, "")
          .subscribe((result) => {
            this.materialPlussDay = result.items.map((el) => {
              return { count: el.count };
            });
            this._demo2ServiceProxy
              .getMaterialMouth(myYear, "MaterialReturn")
              .subscribe((result) => {
                this.materialReturnCountDay = result.items.map((el) => {
                  return { count: el.count };
                });
                this._demo2ServiceProxy
                  .getMaterialSubtractsMouth(myYear, "")
                  .subscribe((result) => {
                    this.materialSubtractsDay = result.items.map((el) => {
                      return { count: el.count };
                    });
                    this.conterbottomright(
                      this.materialPlussDay,
                      this.materialReturnCountDay,
                      this.materialSubtractsDay
                    );
                  });
              });
          });

        this._demo2ServiceProxy.getAllPipelines(myYear).subscribe((result) => {
          this.righttop(result.items);
          //    result.items.map((el) => {
          //   let peplineList=el;
          //   peplineList =  peplineList.map((el) => {
          //       return { StaffCode:el.taskId, Index:el.id,OrderNum:el.actName };
          //     });
          //     this.PeplineObject.push(peplineList);
          // });
        });
      });

    this._demo2ServiceProxy.getTeamTask(myYear, myMonth).subscribe((result) => {
      this.getTeamTask = result.map((el) => {
        return { name: el.teamName, value: el.teamCount };
      });
      this._demo2ServiceProxy
        .getModelCount(myYear, myMonth)
        .subscribe((result) => {
          this.GetModel = result.map((el) => el.name);
          this.GetModelCount = result.map((el) => {
            return { name: el.name, value: el.value };
          });

          this.leftbottomchar();
        });
    });

    this._demo2ServiceProxy.getWorkTimeCount(myYear,myMonth).subscribe((result) => {
      this.GetWorkTimeCount = result.toString();
      this._demo2ServiceProxy.getAbnormalCount(myYear,myMonth).subscribe((result) => {
        this.GetAbnormalCount = result.toString();
        this._demo2ServiceProxy
          .getProcedureFinshCount(myYear,myMonth)
          .subscribe((result) => {
            this.GetProcedureFinshCount = result.toString();
          });
      });
    });

    this._demo2ServiceProxy.getNodeExeSort(myYear).subscribe((result) => {
      this.GetNodeExeSort = result.items;
    });
    this.toptime();
    //this.righttop();

    // this.conterbottomleft();
    //this.conterbottomright();
  }

  hiddentop() {
    this.isshow = false;
    $("header-bar").hide();
    $(".m-body").removeClass("m-body");
    $("footer-bar").hide();
  }
  showtop() {
    this.isshow = true;
    $("header-bar").show();
    $(".m-grid--desktop").addClass("m-body");
    $("footer-bar").show();
  }

  // ngOnInit(): void {
  //   this.toptime();
  //   this.righttop();
  // }
  toptime() {


    setInterval(function () {
      var myDate =new Date();
      var myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
      var myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
      var myToday = myDate.getDate(); //获取当前日(1-31)
      var myDay = myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
      var myHour = myDate.getHours(); //获取当前小时数(0-23)
      var myMinute = myDate.getMinutes(); //获取当前分钟数(0-59)
      var mySecond = myDate.getSeconds(); //获取当前秒数(0-59)
      var week = [
        "星期日",
        "星期一",
        "星期二",
        "星期三",
        "星期四",
        "星期五",
        "星期六",
      ];
      var nowTime;

      nowTime =
        myYear +
        "-" +
        myMonth +
        "-" +
        myToday +
        "&nbsp;&nbsp;" +
        myHour +
        ":" +
        myMinute +
        ":" +
        mySecond +
        "&nbsp;&nbsp;" +
        week[myDay] +
        "&nbsp;&nbsp;";
      //console.log(nowTime);
      $("#time").html(nowTime);
    }, 1000);
  }
  righttop(pipleItem) {
    var data = this.getdata();
    var staffWgInfo = data.staffHandleInfo.staffWgInfo;
    //获取员工积分信息
    var channelJfMap = data.staffHandleInfo.channelJfMap;
    var channelStaffLen = data.staffHandleInfo.channelStaffLen;
    var staffHandleInfo = data.staffHandleInfo.staffHandleInfo || [],
      staffHandleInfoLen = 6;
    var html = [],
      index = 0;
    console.log(staffHandleInfo);

    for (var key in pipleItem) {
      var itemArr = pipleItem[key];

      index++;
      var wgCount = staffWgInfo[itemArr[0].staffCode] || "0";
      var tr1 = [
        "<tr >",
        '<td colspan="3" style="width: 33%;height: 20px;">',
        '<div style="width: 20px;height: 20px;line-height: 18px;vertical-align: middle;border-radius:10px;display: block;text-align: center;color: #03c2ec;border: 1px solid #03c2ec;margin-top: 5px;font-size: 10px;float: left;color: #fff;margin-right: 5px;margin-left: 10px;" >' +
          itemArr[0].rowNuberID +
          "</div>",
        '<div style="color: #fff;float: left;font-size: 20px;font-weight: 600; color: rgba(255, 255, 255, 1);margin-right: 15px;">' +
          itemArr[0].barCode +
          "</div>",
        '<div style="color: #fff;margin-top: 5px;float: left;font-size: 15px;width: 60px;white-space: nowrap;font-weight: 600;">|&nbsp;&nbsp;图号</div>',
        '<div style="color: #fff;margin-right: 5px;margin-top: 5px;float: left;color: #dc9546;white-space: nowrap;text-align: left;font-weight: 600;">' +
          itemArr[0].drawingCode +
          "</div>",
        "</td>",
        "</tr>",
        "<tr>",
        "<td style='width: 33%;height: 20px;'> ",
        '<div style="float: left; height: 5rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px; width:98%">',
        '<span style="overflow: hidden; font-size:15px;width:100%;display: block;height: 50%;">当前节点</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
          itemArr[0].actName +
          "</span>",
        "</div>",
        "</td>",
        "<td style='width: 33%;height: 20px;'>",
        '<div style="float: left; height: 5rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px;width:98%">',
        '<span style="font-size:15px;width:100%;display: block;height: 50%;">处理角色</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
          itemArr[0].actRole +
          "</spanstyle=>",
        "</div>",
        "</td>",
        "<td style='width: 33%;height: 20px;'>",
        '<div class="staff-alarm" style="float: left; height: 5rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px;width:98%">',
        '<span style="font-size:15px;width:100%;display: block;height: 50%;">异常情况</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
          wgCount +
          "次</span>",
        "</div>",
        "</td>",
        "</tr> ",
      ];
      var tr2 = [];
      if (itemArr.length > 1) {
        index++;
        var wgCount = staffWgInfo[itemArr[1].staffCode] || "0";
        tr2 = [
          '<tr><td colspan="3" ><div style="margin:9px;height:2px;background:linear-gradient(to left,#181C41,#7187AC,#181C41)"></div></td></tr>',
          '<tr class="td-avg-time"> ',
          '<td colspan="3" style="width: 33%;height: 20px;"> ',
          '<div style="width: 20px;height: 20px;line-height: 18px;vertical-align: middle;border-radius:10px;display: block;text-align: center;color: #03c2ec;border: 1px solid #03c2ec;margin-top: 5px;font-size: 10px;float: left;color: #fff;margin-right: 5px;margin-left: 10px;">' +
            itemArr[1].rowNuberID +
            "</div>",
          '<div style="color: #fff;float: left;font-size: 20px;font-weight: 600; color: rgba(255, 255, 255, 1);margin-right: 15px;">' +
            itemArr[1].barCode +
            "</div>",
          '<div style="color: #fff;margin-top: 5px;float: left;font-size: 15px;width: 60px;white-space: nowrap;font-weight: 600;">|&nbsp;&nbsp;图号</div>',
          '<div style="color: #fff;margin-right: 5px;margin-top: 5px;float: left;color: #dc9546;white-space: nowrap;text-align: left;font-weight: 600;">' +
            itemArr[0].drawingCode +
            "</div>",
          "</td>",
          "</tr>",
          "<tr>",
          "<td style='width: 33%;height: 20px;'> ",
          '<div style="float: left;height: 6rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px; width:98%">',
          '<span style="overflow: hidden;font-size:15px;width:100%;display: block;height: 50%;">当前节点</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
            itemArr[0].actName +
            "</span>",
          "</div>",
          "</td>",
          "<td style='width: 33%;height: 20px;'>",
          '<div style="float: left; height: 6rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px;width:98%">',
          '<span style="font-size:15px;width:100%;display: block;height: 50%;">处理角色</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
            itemArr[1].actRole +
            "</span>",
          "</div>",
          "</td>",
          "<td style='width: 33%;height: 20px;'>",
          '<div class="staff-alarm" style="float: left; height: 6rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px;width:98%">',
          '<span style="font-size:15px;width:100%;display: block;height: 50%;">异常情况</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
            wgCount +
            "次</span>",
          "</div>",
          "</td>",
          "</tr> ",
        ];
      }
      var tr3 = [];
      if (itemArr.length > 2) {
        index++;
        var wgCount = staffWgInfo[itemArr[2].staffCode] || "0";
        tr3 = [
          '<tr><td colspan="3" ><div style="margin:9px;height:2px;background:linear-gradient(to left,#181C41,#7187AC,#181C41)"></div></td></tr>',
          '<tr class="td-avg-time"> ',
          '<td colspan="3" style="width: 33%;height: 20px;"> ',
          '<div style="font-weight: 600;width: 20px;height: 20px;line-height: 18px;vertical-align: middle;border-radius:10px;display: block;text-align: center;color: #03c2ec;border: 1px solid #03c2ec;margin-right: 5px;font-size: 10px;float: left;color: #fff;margin-left: 10px;margin-top: 5px;">' +
            itemArr[2].rowNuberID +
            "</div>",
          '<div style="font-weight: 600;color: #fff;float: left;font-size: 20px;font-weight: 600; color: rgba(255, 255, 255, 1);margin-right: 15px;">' +
            itemArr[2].barCode +
            "</div>",
          '<div style="color: #fff;margin-top: 5px;float: left;font-size: 15px;width: 60px;white-space: nowrap;font-weight: 600;">|&nbsp;&nbsp;图号</div>',
          '<div style="color: #fff;margin-right: 5px;margin-top: 5px;float: left;color: #dc9546;white-space: nowrap;text-align: left;font-weight: 600;">' +
            itemArr[0].drawingCode +
            "</div>",
          "</td>",
          "</tr>",
          "<tr>",
          "<td style='width: 33%;height: 20px;'> ",
          '<div style="float: left; height: 6rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px; width:98%">',
          '<span style="overflow: hidden;font-size:15px;width:100%;display: block;height: 50%;">当前节点</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
            itemArr[0].actName +
            "</span>",
          "</div>",
          "</td>",
          "<td style='width: 33%;height: 20px;'>",
          '<div style="float: left; height: 6rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px;width:98%">',
          '<span style="font-size:15px;width:100%;display: block;height: 50%;">处理角色</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
            itemArr[2].actRole +
            "</span>",
          "</div>",
          "</td>",
          "<td style='width: 33%;height: 20px;'>",
          '<div class="staff-alarm" style="float: left; height: 6rem;line-height: 3rem;margin-left: 5px;margin-right: 5px;vertical-align: middle;text-align: center;color: #fff;background: #22284a;border-radius: 6px;width:98%">',
          '<span style="font-size:15px;width:100%;display: block;height: 50%;">异常情况</span><span style="color:#00A8FE;font-size:18px;font-weight:600;width:100%;display: block;height: 50%;">' +
            wgCount +
            "次</span>",
          "</div>",
          "</td>",
          "</tr> ",
        ];
      }
      var staffHtml = [
        '<div class="swiper-slide">',
        "<table style='width:100%'>",
        tr1.join(""),
        tr2.join(""),
        tr3.join(""),
        "</table>",
        "</div> ",
      ];
      html.push(staffHtml.join(""));
    }

    $("#staff-info").html("");
    if (html.length > 0) {
      var dataHtml =
        "<div class='swiper-container visual_swiper_staffInfo'><div class='swiper-wrapper'>" +
        html.join("") +
        "</div>";
      $("#staff-info").html(dataHtml);
      var mySwiper1 = new Swiper(".visual_swiper_staffInfo", {
        autoplay: true, //可选选项，自动滑动
        speed: 1500, //可选选项，滑动速度
        // autoplay: {
        //     delay: 15000,//毫秒
        // }
      });
    } else {
      this.noDataTip($("#staff-info"));
    }
  }

  centertopsetInterval:any;
  centertop(getmouthday, greatObject) {
    var data = this.getdata2(getmouthday, greatObject);
    var option = {
      tooltip: {
        trigger: "axis",
        axisPointer: { lineStyle: { color: "#fff" } },
      },
      legend: {
        icon: "rect",
        itemWidth: 14,
        itemHeight: 5,
        itemGap: 10,
        data: ["投产任务", "任务交付", "工艺校验", "执行工序"],
        right: "10px",
        top: "0px",
        textStyle: { fontSize: 12, color: "#fff" },
      },
      grid: { x: 40, y: 50, x2: 45, y2: 40 },
      xAxis: [
        {
          type: "category",
          boundaryGap: false,
          axisLine: { lineStyle: { color: "#57617B" } },
          axisLabel: { textStyle: { color: "#fff" } },
          data: data.channelHandleInfo.dataDateArr,
        },
      ],
      yAxis: [
        {
          type: "value",
          axisTick: {
            show: false,
          },
          axisLine: { lineStyle: { color: "#57617B" } },
          axisLabel: {
            margin: 10,
            textStyle: { color: "#fff" },
            formatter: "{value}",
          },
          splitLine: { lineStyle: { color: "#57617B" } },
        },
        {
          type: "value",
          axisTick: {
            show: false,
          },
          axisLine: { lineStyle: { color: "#57617B" } },
          axisLabel: {
            margin: 10,
            textStyle: { color: "#fff" },
            formatter: "{value}个",
          },
          splitLine: { show: false, lineStyle: { color: "#57617B" } },
        },
      ],
      series: [
        {
          name: "投产任务",
          type: "line",
          smooth: true,
          lineStyle: { normal: { width: 2 } },
          yAxisIndex: 0,
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(185,150,248,0.3)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(185,150,248,0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: { normal: { color: "#B996F8" } },
          data: this.GreatTeamCount,
        },
        {
          name: "任务交付",
          type: "line",
          smooth: true,
          lineStyle: { normal: { width: 2 } },
          yAxisIndex: 0,
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(3, 194, 236, 0.3)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(3, 194, 236, 0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: { normal: { color: "#03C2EC" } },
          data: this.PrintCount,
        },
        {
          name: "工艺校验",
          type: "line",
          smooth: true,
          lineStyle: { normal: { width: 2 } },
          //yAxisIndex: 1,
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(218, 57, 20, 0.3)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(218, 57, 20, 0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: { normal: { color: "#DA3914" } },
          data: this.EXECCount,
        },
        {
          name: "执行工序",
          type: "line",
          smooth: true,
          lineStyle: { normal: { width: 2 } },
          yAxisIndex: 1,
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(232, 190, 49, 0.3)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(232, 190, 49, 0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: { normal: { color: "#E8BE31" } },
          data: this.TechnologyCount,
        },
      ],
    };
    var myChart = echarts.init(
      document.getElementById("channel_handle_detail")
    );
    myChart.setOption(option);
    window.addEventListener("resize", function () {
      myChart.resize();
    });
    clearInterval(this.centertopsetInterval);  
  this.centertopsetInterval= setInterval(function () {
      myChart.clear();
      myChart.setOption(option);
    }, 5*60*1000);
  }


  conterleftSetInterval:any;
  conterbottomleft(orderNum, categoryArr, avgTime) {
    // orderNum: ["39", "77", "96", "41", "24"],
    // categoryArr: [
    //   "生产一组",
    //   "生产二组",
    //   "生产三组",
    //   "生产四组",
    //   "生产五组",
    // ],
    // avgTime: ["107", "170", "148", "100", "58"],
    var data = this.getdata();
    var maxOrder = Math.max.apply(null, orderNum);
    var option = {
      title: { text: "", subtext: "", top: "3", right: "0" },
      tooltip: { trigger: "axis" },
      grid: { left: "18%", right: "8%", bottom: "20%", top: "15%" },
      legend: {
        icon: "rect",
        itemWidth: 14,
        itemHeight: 5,
        itemGap: 10,
        data: ["任务数量", "完成数量"],
        right: "10px",
        top: "0px",
        textStyle: { fontSize: 12, color: "#fff" },
      },
      xAxis: {
        type: "category",
        axisLine: { lineStyle: { color: "#57617B" } },
        axisLabel: { interval: 0, textStyle: { color: "#fff" } },
        data: categoryArr,
      },
      yAxis: [
        {
          type: "value",
          name: "",
          axisLine: { lineStyle: { color: "#57617B" } },
          axisLabel: {
            margin: 10,
            textStyle: { color: "#fff" },
            formatter: "{value}",
          },
          splitLine: { show: false },
        },
        // {
        //   type: "value",
        //   name: "",
        //   max: maxOrder + parseInt(maxOrder) * 0.2,
        //   axisLabel: {
        //     margin: 10,
        //     textStyle: { color: "#fff" },
        //     formatter: "{value}笔",
        //   },
        //   splitLine: {
        //     show: true,
        //     lineStyle: {
        //       type: "dashed",
        //       color: ["#25CEF3"],
        //     },
        //   },
        // },
      ],
      series: [
        {
          name: "任务数量",
          type: "line",
          yAxisIndex: 0,
          smooth: false,
          symbolSize: 5,
          lineStyle: { normal: { width: 2 } },
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(230, 48, 123, 0.8)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(230, 48, 123, 0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: { normal: { color: "#DA2F78" } },
          data: orderNum,
        },
        {
          name: "完成数量",
          type: "bar",
          barWidth: 12,
          //yAxisIndex: 1,
          itemStyle: {
            normal: {
              barBorderRadius: [10, 10, 0, 0],
              color: new echarts.graphic.LinearGradient(
                0,
                1,
                0,
                0,
                [
                  {
                    offset: 0,
                    color: "#4033F9",
                  },
                  {
                    offset: 0.8,
                    color: "#BA97F9",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
            },
          },
          data: avgTime,
        },
      ],
    };
    var myChart = echarts.init(
      document.getElementById("business-type-time-detial")
    );
    myChart.setOption(option);
    window.addEventListener("resize", function () {
      myChart.resize();
    });
    clearInterval(this.conterleftSetInterval);  
    this.conterleftSetInterval= setInterval(function () {
      myChart.clear();
      myChart.setOption(option);
    }, 5*30*1000);
  }
  conterbottomright(
    materialPlussDay,
    materialReturnCountDay,
    materialSubtractsDay
  ) {
    var myChart2 = echarts.init(document.getElementById("main2"));
    var data = {
      uploadData: materialPlussDay,
      updateData: materialReturnCountDay,
      viewData: materialSubtractsDay,
    };
    var uploadCnt = [];
    var updateCnt = [];

    var viewCnt = [];
    if (data.uploadData != null) {
      for (var i = 0; i < data.uploadData.length; i++) {
        uploadCnt.push(data.uploadData[i].count);
      }
    }
    if (data.updateData != null) {
      for (var i = 0; i < data.updateData.length; i++) {
        updateCnt.push(data.updateData[i].count);
      }
    }

    if (data.viewData != null) {
      for (var i = 0; i < data.viewData.length; i++) {
        viewCnt.push(data.viewData[i].count);
      }
    }
    var option = {
      tooltip: {
        trigger: "axis",
        formatter: function (params, ticket, callback) {
          var res = "";
          for (var i = 0, l = params.length; i < l; i++) {
            res += "" + params[i].seriesName + " : " + params[i].value + "<br>";
          }
          return res;
        },
        transitionDuration: 0,
        backgroundColor: "rgba(83,93,105,0.8)",
        borderColor: "#535b69",
        borderRadius: 8,
        borderWidth: 2,
        padding: [5, 10],
        axisPointer: {
          type: "line",
          lineStyle: {
            type: "dashed",
            color: "#ffff00",
          },
        },
      },
      legend: {
        icon: "circle",
        itemWidth: 8,
        itemHeight: 8,
        itemGap: 10,
        top: "0",
        right: "10",
        data: ["入库总量", "出库总量", "退库总量"],
        textStyle: {
          fontSize: 10,
          color: "#a0a8b9",
        },
      },
      grid: {
        top: "30",
        left: "5%",
        right: "10",
        //bottom: '10%',
        containLabel: false,
      },
      xAxis: [
        {
          type: "category",
          boundaryGap: false,
          axisLabel: {
            interval: 0,
            fontSize: 10,
          },
          axisLine: {
            show: false,
            lineStyle: {
              color: "#a0a8b9",
            },
          },
          axisTick: {
            show: false,
          },
          data: [
            "1月",
            "2月",
            "3月",
            "4月",
            "5月",
            "6月",
            "7月",
            "8月",
            "9月",
            "10月",
            "11月",
            "12月",
          ],
          offset: 10,
        },
      ],
      yAxis: [
        {
          type: "value",
          axisLine: {
            show: false,
            lineStyle: {
              color: "#a0a8b9",
            },
          },
          axisLabel: {
            margin: 10,
            textStyle: {
              fontSize: 10,
            },
          },
          splitLine: {
            lineStyle: {
              color: "#2b3646",
            },
          },
          axisTick: {
            show: false,
          },
        },
      ],
      series: [
        {
          name: "入库总量",
          type: "line",
          smooth: true,
          showSymbol: false,
          lineStyle: {
            normal: {
              width: 2,
            },
          },
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(137, 189, 27, 0.3)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(137, 189, 27, 0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: {
            normal: {
              color: "#1cc840",
            },
          },
          data: uploadCnt,
        },
        {
          name: "出库总量",
          type: "line",
          smooth: true,
          showSymbol: false,
          lineStyle: {
            normal: {
              width: 2,
            },
          },
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(219, 50, 51, 0.3)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(219, 50, 51, 0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: {
            normal: {
              color: "#eb5690",
            },
          },
          data: viewCnt,
        },
        {
          name: "退库总量",
          type: "line",
          smooth: true,
          showSymbol: false,
          lineStyle: {
            normal: {
              width: 2,
            },
          },
          areaStyle: {
            normal: {
              color: new echarts.graphic.LinearGradient(
                0,
                0,
                0,
                1,
                [
                  {
                    offset: 0,
                    color: "rgba(0, 136, 212, 0.3)",
                  },
                  {
                    offset: 0.8,
                    color: "rgba(0, 136, 212, 0)",
                  },
                ],
                false
              ),
              shadowColor: "rgba(0, 0, 0, 0.1)",
              shadowBlur: 10,
            },
          },
          itemStyle: {
            normal: {
              color: "#43bbfb",
            },
          },
          data: updateCnt,
        },
      ],
    };
    myChart2.setOption(option);
    window.addEventListener("resize", function () {
      myChart2.resize();
    });

    clearInterval(this.conterrightSetInterval);
    this.conterrightSetInterval=setInterval(function () {
      myChart2.clear();
      myChart2.setOption(option);
    }, 5*30*1000);
  }
  conterrightSetInterval:any;

  leftbottomchar() {
    var myChart = echarts.init(document.getElementById("chart2"));
    var option = {
      tooltip: {
        trigger: "item",
        formatter: "{b}: {c} ({d}%)",
      },
      legend: {
        orient: "vertical",
        left: 10,
        data: this.GetModel,
      },

      series: [
        {
          name: "",
          type: "pie",
          selectedMode: "single",
          radius: [0, "40%"],

          label: {
            position: "inner",
          },
          labelLine: {
            show: false,
          },
          data: this.getTeamTask,
        },
        {
          name: "",
          type: "pie",
          radius: ["50%", "65%"],
          label: {
            formatter: "{b|{b}：}{c}  {per|{d}%}  ",
            // backgroundColor: "#eee",
            borderColor: "#aaa",
            borderWidth: 1,
            borderRadius: 4,
            // shadowBlur:3,
            // shadowOffsetX: 2,
            // shadowOffsetY: 2,
            // shadowColor: '#999',
            // padding: [0, 7],
            rich: {
              a: {
                color: "#999",
                lineHeight: 22,
                align: "center",
              },
              // abg: {
              //     backgroundColor: '#333',
              //     width: '100%',
              //     align: 'right',
              //     height: 22,
              //     borderRadius: [4, 4, 0, 0]
              // },
              hr: {
                borderColor: "#aaa",
                width: "100%",
                borderWidth: 0.5,
                height: 0,
              },
              b: {
                fontSize: 16,
                lineHeight: 33,
              },
              per: {
                color: "#eee",
                backgroundColor: "#334455",
                padding: [2, 4],
                borderRadius: 2,
              },
            },
          },
          data: this.GetModelCount,
        },
      ],
    };

    myChart.setOption(option);
    window.addEventListener("resize", function () {
      myChart.resize();
    });

  clearInterval(this.leftcharSetInterval);

  this.leftcharSetInterval=setInterval(function () {
      myChart.clear();
      myChart.setOption(option);
    }, 5*30*1000);


  }
  leftcharSetInterval:any;


  noDataTip($selector) {
    var currModH = $selector.height();
    var top = currModH > 180 ? "35%" : "13%";
    var $li = [
      "<div class='no-data' style='width:90%;position: absolute;top:" +
        top +
        ";text-align:center;color:#a59999;'>",
      "<img src='static/images/no-data.png' style='width:200px;height:200px;'/>",
      "<div style='font-size:16px;opacity:0.7;color:#fff;'>暂无数据</div>",
      "</div>",
    ];
    $selector.append($li.join(""));
  }
  getdata() {
    var data = {
      code: 0,
      businessTypeAnalysis: {
        orderNum: ["39", "77", "96", "41", "24"],
        categoryArr: [
          "生产一组",
          "生产二组",
          "生产三组",
          "生产四组",
          "生产五组",
        ],
        avgTime: ["107", "170", "148", "100", "58"],
        legendArr: ["任务数量", "完成数量"],
      },
      staffHandleInfo: {
        channelJfMap: {
          NJ05166060_charge: 9194,
          NJ68689949_charge: 2848,
          NJ11050091_charge: -119,
          NJ11057808_charge: -688,
          NJ68689949_index: 11,
          NJ0104010153_charge: -139,
          NJ72000095_charge: 9433,
          NJ05166060_index: 6,
          NJ11049063_index: 10,
          "9901500010_charge": -250,
          channelOrder: 28,
          channelTotal: 57159,
          NJ72000095_index: 5,
          NJ11010340_index: 15,
          "9901660106_index": 3,
          NJ51789168_index: 4,
          NJ36038678_charge: 918,
          NJ90906337_index: 7,
          NJ37825052_index: 8,
          NJ0104010153_index: 18,
          channelLength: 21,
          NJ11049063_charge: 6081,
          NJ11032104_charge: -71,
          NJ11032099_charge: 6750,
          "0915020_index": 13,
          NJ37709514_charge: 13063,
          NJ51789168_charge: 11633,
          channelSum: 97714,
          staffCode: -3505,
          "9901660106_charge": 12390,
          NJ11057808_index: 20,
          NJ90906337_charge: 8411,
          "0915020_charge": 221,
          NJ90908499_index: 21,
          NJ37825052_charge: 7930,
          NJ11010340_charge: 0,
          NJ36038678_index: 12,
          "9901500010_index": 19,
          NJ37709514_index: 2,
          NJ11032500_charge: 169,
          NJ11032500_index: 14,
          NJ11050091_index: 17,
          NJ156677_charge: 13445,
          NJ156677_index: 1,
          NJ90908499_charge: -3505,
          NJ11032099_index: 9,
          NJ11032104_index: 16,
        },
        channelStaffLen: 11,
        channelStartWeiGui: 1,
        channelOrderNum: "233",
        staffHandleInfo: {
          map_201912311524067392: [
            {
              staffCode: "9901500010",
              index: 1,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-001",
            },
            {
              staffCode: "9901660106",
              index: 2,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-001",
            },
            {
              staffCode: "9901660106",
              index: 3,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-003",
            },
          ],
          map_201912311524064349: [
            {
              staffCode: "NJ11032099",
              index: 4,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-004",
            },
            {
              staffCode: "NJ11032500",
              index: 5,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-005",
            },
            {
              staffCode: "NJ90906337",
              index: 6,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-006",
            },
          ],
          map_201912311524064395: [
            {
              staffCode: "NJ156677",
              index: 7,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-007",
            },
            {
              staffCode: "NJ36038678",
              index: 8,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-008",
            },
            {
              staffCode: "NJ36038678",
              index: 9,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-009",
            },
          ],
          map_201912311524063662: [
            {
              staffCode: "NJ37709514",
              index: 10,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-010",
            },
            {
              staffCode: "NJ37825052",
              index: 11,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-011",
            },
            {
              staffCode: "NJ90906337",
              index: 12,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-012",
            },
          ],
          map_201912311524062632: [
            {
              staffCode: "NJ51789168",
              index: 13,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-013",
            },
            {
              staffCode: "NJ72000095",
              index: 14,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-014",
            },
            {
              staffCode: "NJ90906337",
              index: 15,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-015",
            },
          ],
          map_201912311524063302: [
            {
              staffCode: "NJ90906337",
              index: 16,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-016",
            },
            {
              staffCode: "9901660106",
              index: 17,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-017",
            },
            {
              staffCode: "9901660106",
              index: 18,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-018",
            },
          ],
        },
        staffWgInfo: {
          NJ11032500: 0,
          NJ36038678: 0,
          NJ156677: 0,
          NJ37709514: 0,
          NJ51789168: 0,
          NJ90906337: 0,
          NJ37825052: 0,
          "9901500010": 0,
          NJ72000095: 0,
          "9901660106": 0,
          NJ11032099: 0,
        },
        channelAvgTime: "1.28",
      },
      channelHandleInfo: {
        orderNumData: [
          "251",
          "189",
          "212",
          "222",
          "207",
          "150",
          "181",
          "202",
          "183",
          "193",
          "0",
          "0",
          "0",
          "0",
          "0",
          "198",
          "202",
          "205",
          "242",
          "216",
          "176",
          "126",
          "254",
          "207",
          "211",
          "191",
          "224",
          "213",
          "297",
          "0",
        ],
        lineUpData: [
          "200",
          "150",
          "298",
          "201",
          "139",
          "209",
          "599",
          "302",
          "251",
          "461",
          "244",
          "151",
          "388",
          "267",
          "25",
          "570",
          "176",
          "378",
          "410",
          "602",
          "393",
          "193",
          "510",
          "389",
          "278",
          "530",
          "667",
          "565",
          "259",
          "0",
        ],
        custNumData: [
          "228",
          "176",
          "206",
          "203",
          "186",
          "137",
          "162",
          "177",
          "164",
          "169",
          "0",
          "0",
          "0",
          "0",
          "0",
          "175",
          "185",
          "179",
          "224",
          "191",
          "161",
          "115",
          "229",
          "190",
          "172",
          "164",
          "201",
          "192",
          "273",
          "0",
        ],
        dataDateArr: this.GreatTeamDay,
        handleTimeData: [
          "473",
          "73",
          "77",
          "74",
          "71",
          "66",
          "80",
          "68",
          "52",
          "70",
          "0",
          "0",
          "0",
          "0",
          "0",
          "29",
          "61",
          "79",
          "54",
          "87",
          "45",
          "10",
          "93",
          "85",
          "87",
          "98",
          "26",
          "95",
          "36",
          "0",
        ],
      },
    };
    return data;
  }

  getdata2(getmouthday, greatObject) {
    var data = {
      code: 0,
      businessTypeAnalysis: {
        orderNum: ["39", "77", "96", "41", "24"],
        categoryArr: [
          "生产一组",
          "生产二组",
          "生产三组",
          "生产四组",
          "生产五组",
        ],
        avgTime: ["107", "170", "148", "100", "58"],

        //  orderNum: greatObject.orderNum,
        //   categoryArr: greatObject.categoryArr,
        //   avgTime: greatObject.avgTime,
        legendArr: ["任务数量", "完成数量"],
      },
      staffHandleInfo: {
        channelJfMap: {
          NJ05166060_charge: 9194,
          NJ68689949_charge: 2848,
          NJ11050091_charge: -119,
          NJ11057808_charge: -688,
          NJ68689949_index: 11,
          NJ0104010153_charge: -139,
          NJ72000095_charge: 9433,
          NJ05166060_index: 6,
          NJ11049063_index: 10,
          "9901500010_charge": -250,
          channelOrder: 28,
          channelTotal: 57159,
          NJ72000095_index: 5,
          NJ11010340_index: 15,
          "9901660106_index": 3,
          NJ51789168_index: 4,
          NJ36038678_charge: 918,
          NJ90906337_index: 7,
          NJ37825052_index: 8,
          NJ0104010153_index: 18,
          channelLength: 21,
          NJ11049063_charge: 6081,
          NJ11032104_charge: -71,
          NJ11032099_charge: 6750,
          "0915020_index": 13,
          NJ37709514_charge: 13063,
          NJ51789168_charge: 11633,
          channelSum: 97714,
          staffCode: -3505,
          "9901660106_charge": 12390,
          NJ11057808_index: 20,
          NJ90906337_charge: 8411,
          "0915020_charge": 221,
          NJ90908499_index: 21,
          NJ37825052_charge: 7930,
          NJ11010340_charge: 0,
          NJ36038678_index: 12,
          "9901500010_index": 19,
          NJ37709514_index: 2,
          NJ11032500_charge: 169,
          NJ11032500_index: 14,
          NJ11050091_index: 17,
          NJ156677_charge: 13445,
          NJ156677_index: 1,
          NJ90908499_charge: -3505,
          NJ11032099_index: 9,
          NJ11032104_index: 16,
        },
        channelStaffLen: 11,
        channelStartWeiGui: 1,
        channelOrderNum: "233",
        staffHandleInfo: {
          map_201912311524067392: [
            {
              staffCode: "9901500010",
              index: 1,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-001",
            },
            {
              staffCode: "9901660106",
              index: 2,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-001",
            },
            {
              staffCode: "9901660106",
              index: 3,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-003",
            },
          ],
          map_201912311524064349: [
            {
              staffCode: "NJ11032099",
              index: 4,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-004",
            },
            {
              staffCode: "NJ11032500",
              index: 5,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-005",
            },
            {
              staffCode: "NJ90906337",
              index: 6,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-006",
            },
          ],
          map_201912311524064395: [
            {
              staffCode: "NJ156677",
              index: 7,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-007",
            },
            {
              staffCode: "NJ36038678",
              index: 8,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-008",
            },
            {
              staffCode: "NJ36038678",
              index: 9,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-009",
            },
          ],
          map_201912311524063662: [
            {
              staffCode: "NJ37709514",
              index: 10,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-010",
            },
            {
              staffCode: "NJ37825052",
              index: 11,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-011",
            },
            {
              staffCode: "NJ90906337",
              index: 12,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-012",
            },
          ],
          map_201912311524062632: [
            {
              staffCode: "NJ51789168",
              index: 13,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-013",
            },
            {
              staffCode: "NJ72000095",
              index: 14,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-014",
            },
            {
              staffCode: "NJ90906337",
              index: 15,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-015",
            },
          ],
          map_201912311524063302: [
            {
              staffCode: "NJ90906337",
              index: 16,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-016",
            },
            {
              staffCode: "9901660106",
              index: 17,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-017",
            },
            {
              staffCode: "9901660106",
              index: 18,
              orderNum: "原材料管理员",
              avgTime: "工序1.领料",
              staffName: "task-53-018",
            },
          ],
        },
        staffWgInfo: {
          NJ11032500: 0,
          NJ36038678: 0,
          NJ156677: 0,
          NJ37709514: 0,
          NJ51789168: 0,
          NJ90906337: 0,
          NJ37825052: 0,
          "9901500010": 0,
          NJ72000095: 0,
          "9901660106": 0,
          NJ11032099: 0,
        },
        channelAvgTime: "1.28",
      },
      channelHandleInfo: {
        orderNumData: [
          "251",
          "189",
          "212",
          "222",
          "207",
          "150",
          "181",
          "202",
          "183",
          "193",
          "0",
          "0",
          "0",
          "0",
          "0",
          "198",
          "202",
          "205",
          "242",
          "216",
          "176",
          "126",
          "254",
          "207",
          "211",
          "191",
          "224",
          "213",
          "297",
          "0",
        ],
        lineUpData: [
          "200",
          "150",
          "298",
          "201",
          "139",
          "209",
          "599",
          "302",
          "251",
          "461",
          "244",
          "151",
          "388",
          "267",
          "25",
          "570",
          "176",
          "378",
          "410",
          "602",
          "393",
          "193",
          "510",
          "389",
          "278",
          "530",
          "667",
          "565",
          "259",
          "0",
        ],
        custNumData: [
          "228",
          "176",
          "206",
          "203",
          "186",
          "137",
          "162",
          "177",
          "164",
          "169",
          "0",
          "0",
          "0",
          "0",
          "0",
          "175",
          "185",
          "179",
          "224",
          "191",
          "161",
          "115",
          "229",
          "190",
          "172",
          "164",
          "201",
          "192",
          "273",
          "0",
        ],
        dataDateArr: getmouthday,
        handleTimeData: [
          "473",
          "73",
          "77",
          "74",
          "71",
          "66",
          "80",
          "68",
          "52",
          "70",
          "0",
          "0",
          "0",
          "0",
          "0",
          "29",
          "61",
          "79",
          "54",
          "87",
          "45",
          "10",
          "93",
          "85",
          "87",
          "98",
          "26",
          "95",
          "36",
          "0",
        ],
      },
    };
    return data;
  }
}
